     import {
         checkUserName,
         checkPassWord
     } from '@/utils'

     /**
      * 目标：点击注册，检验用户名和密码长度
      */
     import axios from 'axios'
     document.querySelector('.login-btn').addEventListener('click', () => {
         const username = document.querySelector('.username').value
         const password = document.querySelector('.password').value

         if (!checkUserName(username)) {
             alert('用户名长度要大于等于8位')
             return
         } else if (!checkPassWord(password)) {
             alert('密码长度要求大于等于6位')
             return
         }

         console.log('用户名和密码长度符合要求')
         axios({
             url: 'http://hmajax.itheima.net/api/register',
             method: 'POST',
             data: {
                 username,
                 password
             }
         }).then(result => {
             alert(result.data.message)
         }).catch(error => {
             alert(error.response.data.message)
         })
     })

     import '@/css/index.css'
     import '@/less/index.less'
     import imgObj from '@/assets/logo.png'
     document.querySelector('.logo-img').src = imgObj
     const arr = [1, 2, 3]
     const result = arr.map(val => val + 1)
     console.log(result)